package fnic.jsontrans;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public class SearchResultJsonMode {

	public long totalhits;
	List<Map<String, Object>>  output;
	public OutStat<Serializable>     statistic;
	
	public static class OutStat<T extends Serializable>{
		public String getType() {
			return type;
		}
		public T getResult() {
			return result;
		}
		public void setType(String type) {
			this.type = type;
		}
		public void setResult(T result) {
			this.result = result;
		}
		
		String type;
		T result;
	}
	
	public static class OutTermFieldStat implements Serializable{
		public String getName() {
			return name;
		}
		public Map<String, Integer> getValuecount() {
			return valuecount;
		}
		public void setName(String name) {
			this.name = name;
		}
		public void setValuecount(Map<String, Integer> valuecount) {
			this.valuecount = valuecount;
		}

		String name;
		Map<String, Integer> valuecount;
	}
	
	public static class OutTermsKVStat implements Serializable{
		public String getName() {
			return name;
		}
		public List<KeyValueStat> getValuecount() {
			return valuecount;
		}
		public void setName(String name) {
			this.name = name;
		}
		public void setValuecount(List<KeyValueStat> valuecount) {
			this.valuecount = valuecount;
		}
		
		String name;
		List<KeyValueStat> valuecount;
		
	}
	
	public static class OutFieldStat implements Serializable{
		public String getName() {
			return name;
		}
		public Map<String, Double> getResobj() {
			return resobj;
		}
		public void setName(String name) {
			this.name = name;
		}
		public void setResobj(Map<String, Double> resobj) {
			this.resobj = resobj;
		}

		String name;
		Map<String, Double> resobj;
	}
	
	public static class OutRangesGroupStat implements Serializable{
		public String getName() {
			return name;
		}
		public List<Map<String, Double>> getResobj() {
			return resobj;
		}
		public void setName(String name) {
			this.name = name;
		}
		public void setResobj(List<Map<String, Double>> resobj) {
			this.resobj = resobj;
		}
		
		String name;
		List<Map<String, Double>> resobj;
	}
	
	public static class KeyValueStat{
		public String getKeyterm() {
			return keyterm;
		}
		public Map<String, Double> getValuestat() {
			return valuestat;
		}
		public void setKeyterm(String keyterm) {
			this.keyterm = keyterm;
		}
		public void setValuestat(Map<String, Double> valuestat) {
			this.valuestat = valuestat;
		}
		
		String keyterm;
		Map<String, Double> valuestat;
	}
	
	public static class TypeScore{
		public String getType() {
			return type;
		}
		public void setType(String type) {
			this.type = type;
		}
		public int getScore() {
			return score;
		}
		public void setScore(int score) {
			this.score = score;
		}
		@Override
		public String toString() {
			return "TypeScore [type=" + type + ", score=" + score + "]";
		}
		String type;
		int score;
	}
}
